﻿<Window
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:my="clr-namespace:Microsoft.Samples.Kinect.WpfViewers;assembly=Microsoft.Samples.Kinect.WpfViewers"  
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:Toolkit="clr-namespace:Microsoft.Kinect.Toolkit;assembly=Microsoft.Kinect.Toolkit" mc:Ignorable="d" x:Class="videoTest.MainWindow"
        Title="MainWindow" Height="768" Width="1366" Loaded="Window_Loaded" Closing="Window_Closing">
    <Window.Resources>
        <LinearGradientBrush x:Key="HorizontalSliderThumbHoverBackgroundInverted" EndPoint="0,0" StartPoint="0,1">
            <GradientStop Color="white" Offset="0"/>
            <GradientStop Color="#B8E2F9" Offset="0.5"/>
            <GradientStop Color="#B0DFF8" Offset="1"/>
        </LinearGradientBrush>
        <SolidColorBrush x:Key="HorizontalSliderThumbHoverBorder" Color="#3C7FB1"/>
        <LinearGradientBrush x:Key="HorizontalSliderThumbPressedBackgroundInverted" EndPoint="0,0" StartPoint="0,1">
            <GradientStop Color="#B8E4FA" Offset="0.25"/>
            <GradientStop Color="#5EB4E3" Offset="0.5"/>
            <GradientStop Color="#4C8BB4" Offset="1"/>
        </LinearGradientBrush>
        <SolidColorBrush x:Key="HorizontalSliderThumbPressedBorder" Color="#2C628B"/>
        <Geometry x:Key="SliderThumbDisabledGeometry">M -5,-10.5 L 5,-10.5 L 5,10.5 L -5,10.5 Z</Geometry>
        <Geometry x:Key="SliderPointedThumbDisabledGeometry">M 4.5,-8.5 L -4.5,-8.5 L -4.5,4.5 L -0.5,8.5 L 0.5,8.5 L 4.5,4.5 Z</Geometry>
        <Geometry x:Key="SliderPointedThumbOuterBorderGeometry">M 4.5,-7.5 A 1 1 0 0 0 3.5,-8.5 L -3.5,-8.5 A 1 1 0 0 0 -4.5,-7.5 L -4.5,4.5 L -0.5,8.5 L 0.5,8.5 L 4.5,4.5 Z</Geometry>
        <LinearGradientBrush x:Key="HorizontalSliderThumbNormalBackgroundInverted" EndPoint="0,0" StartPoint="0,1">
            <GradientStop Color="White" Offset="0"/>
            <GradientStop Color="#F0EFEF" Offset="0.4"/>
            <GradientStop Color="#D6D5D5" Offset=".8"/>
        </LinearGradientBrush>
        <Geometry x:Key="SliderPointedThumbMiddleBorderGeometry">M 3.5,-7.5 L -3.5,-7.5 L -3.5,4.5 L 0,8 L 3.5,4.5 Z</Geometry>
        <Style x:Key="HorizontalSliderUpThumbStyle" TargetType="{x:Type Thumb}">
            <Setter Property="Focusable" Value="false"/>
            <Setter Property="OverridesDefaultStyle" Value="true"/>
            <Setter Property="Height" Value="18"/>
            <Setter Property="Width" Value="10"/>
            <Setter Property="Foreground" Value="Gray"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type Thumb}">
                        <Canvas SnapsToDevicePixels="true">
                            <Canvas.RenderTransform>
                                <TransformGroup>
                                    <TransformGroup.Children>
                                        <TransformCollection>
                                            <RotateTransform Angle="180"/>
                                            <TranslateTransform X="5" Y="9"/>
                                        </TransformCollection>
                                    </TransformGroup.Children>
                                </TransformGroup>
                            </Canvas.RenderTransform>
                            <Path x:Name="Background" Data="{StaticResource SliderPointedThumbOuterBorderGeometry}" Fill="{StaticResource HorizontalSliderThumbNormalBackgroundInverted}"/>
                            <Path x:Name="InnerBorder" Data="{StaticResource SliderPointedThumbMiddleBorderGeometry}" Stroke="White" StrokeThickness="1"/>
                            <Path x:Name="OuterBorder" Data="{StaticResource SliderPointedThumbOuterBorderGeometry}" Stroke="#FF929292" StrokeThickness="1"/>
                        </Canvas>
                        <ControlTemplate.Triggers>
                            <Trigger Property="IsMouseOver" Value="true">
                                <Setter Property="Fill" TargetName="Background" Value="{StaticResource HorizontalSliderThumbHoverBackgroundInverted}"/>
                                <Setter Property="Stroke" TargetName="OuterBorder" Value="{StaticResource HorizontalSliderThumbHoverBorder}"/>
                            </Trigger>
                            <Trigger Property="Foreground" Value="Blue">
                                <Setter Property="Fill" TargetName="Background" Value="{StaticResource HorizontalSliderThumbHoverBackgroundInverted}"/>
                                <Setter Property="Stroke" TargetName="OuterBorder" Value="{StaticResource HorizontalSliderThumbHoverBorder}"/>
                            </Trigger>
                            <Trigger Property="IsDragging" Value="true">
                                <Setter Property="Fill" TargetName="Background" Value="{StaticResource HorizontalSliderThumbPressedBackgroundInverted}"/>
                                <Setter Property="Stroke" TargetName="OuterBorder" Value="{StaticResource HorizontalSliderThumbPressedBorder}"/>
                            </Trigger>
                            <Trigger Property="IsEnabled" Value="false">
                                <Setter Property="Fill" TargetName="Background" Value="#FFF4F4F4"/>
                                <Setter Property="Stroke" TargetName="InnerBorder" Value="{x:Null}"/>
                                <Setter Property="Data" TargetName="OuterBorder" Value="{StaticResource SliderThumbDisabledGeometry}"/>
                                <Setter Property="Stroke" TargetName="OuterBorder" Value="#FFAEB1AF"/>
                                <Setter Property="Data" TargetName="OuterBorder" Value="{StaticResource SliderPointedThumbDisabledGeometry}"/>
                            </Trigger>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
        <LinearGradientBrush x:Key="HorizontalSliderThumbHoverBackground" EndPoint="0,1" StartPoint="0,0">
            <GradientStop Color="white" Offset="0"/>
            <GradientStop Color="#B8E2F9" Offset="0.5"/>
            <GradientStop Color="#B0DFF8" Offset="1"/>
        </LinearGradientBrush>
        <LinearGradientBrush x:Key="HorizontalSliderThumbPressedBackground" EndPoint="0,1" StartPoint="0,0">
            <GradientStop Color="#B8E4FA" Offset="0.25"/>
            <GradientStop Color="#5EB4E3" Offset="0.5"/>
            <GradientStop Color="#4C8BB4" Offset="1"/>
        </LinearGradientBrush>
        <LinearGradientBrush x:Key="HorizontalSliderThumbNormalBackground" EndPoint="0,1" StartPoint="0,0">
            <GradientStop Color="White" Offset="0"/>
            <GradientStop Color="#F0EFEF" Offset="0.4"/>
            <GradientStop Color="#D6D5D5" Offset=".8"/>
        </LinearGradientBrush>
        <Style x:Key="HorizontalSliderDownThumbStyle" TargetType="{x:Type Thumb}">
            <Setter Property="Focusable" Value="false"/>
            <Setter Property="OverridesDefaultStyle" Value="true"/>
            <Setter Property="Height" Value="18"/>
            <Setter Property="Width" Value="10"/>
            <Setter Property="Foreground" Value="Gray"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type Thumb}">
                        <Canvas SnapsToDevicePixels="true">
                            <Canvas.RenderTransform>
                                <TranslateTransform X="5" Y="9"/>
                            </Canvas.RenderTransform>
                            <Path x:Name="Background" Data="{StaticResource SliderPointedThumbOuterBorderGeometry}" Fill="{StaticResource HorizontalSliderThumbNormalBackground}"/>
                            <Path x:Name="InnerBorder" Data="{StaticResource SliderPointedThumbMiddleBorderGeometry}" Stroke="White" StrokeThickness="1"/>
                            <Path x:Name="OuterBorder" Data="{StaticResource SliderPointedThumbOuterBorderGeometry}" Stroke="#FF929292" StrokeThickness="1"/>
                        </Canvas>
                        <ControlTemplate.Triggers>
                            <Trigger Property="IsMouseOver" Value="true">
                                <Setter Property="Fill" TargetName="Background" Value="{StaticResource HorizontalSliderThumbHoverBackground}"/>
                                <Setter Property="Stroke" TargetName="OuterBorder" Value="{StaticResource HorizontalSliderThumbHoverBorder}"/>
                            </Trigger>
                            <Trigger Property="Foreground" Value="Blue">
                                <Setter Property="Fill" TargetName="Background" Value="{StaticResource HorizontalSliderThumbHoverBackground}"/>
                                <Setter Property="Stroke" TargetName="OuterBorder" Value="{StaticResource HorizontalSliderThumbHoverBorder}"/>
                            </Trigger>
                            <Trigger Property="IsDragging" Value="true">
                                <Setter Property="Fill" TargetName="Background" Value="{StaticResource HorizontalSliderThumbPressedBackground}"/>
                                <Setter Property="Stroke" TargetName="OuterBorder" Value="{StaticResource HorizontalSliderThumbPressedBorder}"/>
                            </Trigger>
                            <Trigger Property="IsEnabled" Value="false">
                                <Setter Property="Fill" TargetName="Background" Value="#FFF4F4F4"/>
                                <Setter Property="Stroke" TargetName="InnerBorder" Value="{x:Null}"/>
                                <Setter Property="Data" TargetName="OuterBorder" Value="{StaticResource SliderThumbDisabledGeometry}"/>
                                <Setter Property="Stroke" TargetName="OuterBorder" Value="#FFAEB1AF"/>
                                <Setter Property="Data" TargetName="OuterBorder" Value="{StaticResource SliderPointedThumbDisabledGeometry}"/>
                            </Trigger>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
        <LinearGradientBrush x:Key="HorizontalSliderTrackNormalBorder" EndPoint="0,1" StartPoint="0,0">
            <GradientStop Color="#FFAEB1AF" Offset="0.1"/>
            <GradientStop Color="White" Offset=".9"/>
        </LinearGradientBrush>
        <SolidColorBrush x:Key="HorizontalSliderTrackNormalBackground" Color="#FFE7EAEA"/>
        <Style x:Key="SliderRepeatButtonStyle" TargetType="{x:Type RepeatButton}">
            <Setter Property="OverridesDefaultStyle" Value="true"/>
            <Setter Property="IsTabStop" Value="false"/>
            <Setter Property="Focusable" Value="false"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type RepeatButton}">
                        <Rectangle Fill="Transparent"/>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
        <Geometry x:Key="SliderThumbOuterBorderGeometry">M -5,-9.5 A 1 1 0 0 1 -4,-10.5 L 4,-10.5 A 1 1 0 0 1 5,-9.5 L 5,9.5 A 1 1 0 0 1 4,10.5 L -4,10.5 A 1 1 0 0 1 -5,9.5 Z</Geometry>
        <Geometry x:Key="SliderThumbMiddleBorderGeometry">M -4,-9.5 L 4,-9.5 L 4,9.5 L -4,9.5 Z</Geometry>
        <Style x:Key="HorizontalSliderThumbStyle" TargetType="{x:Type Thumb}">
            <Setter Property="Focusable" Value="false"/>
            <Setter Property="OverridesDefaultStyle" Value="true"/>
            <Setter Property="Height" Value="22"/>
            <Setter Property="Width" Value="11"/>
            <Setter Property="Foreground" Value="Gray"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type Thumb}">
                        <Canvas SnapsToDevicePixels="true">
                            <Canvas.RenderTransform>
                                <TranslateTransform X="5.5" Y="11"/>
                            </Canvas.RenderTransform>
                            <Path x:Name="Background" Data="{StaticResource SliderThumbOuterBorderGeometry}" Fill="{StaticResource HorizontalSliderThumbNormalBackground}"/>
                            <Path x:Name="InnerBorder" Data="{StaticResource SliderThumbMiddleBorderGeometry}" Stroke="White"/>
                            <Path x:Name="OuterBorder" Data="{StaticResource SliderThumbOuterBorderGeometry}" Stroke="#FF929292"/>
                        </Canvas>
                        <ControlTemplate.Triggers>
                            <Trigger Property="IsMouseOver" Value="true">
                                <Setter Property="Fill" TargetName="Background" Value="{StaticResource HorizontalSliderThumbHoverBackground}"/>
                                <Setter Property="Stroke" TargetName="OuterBorder" Value="{StaticResource HorizontalSliderThumbHoverBorder}"/>
                            </Trigger>
                            <Trigger Property="Foreground" Value="Blue">
                                <Setter Property="Fill" TargetName="Background" Value="{StaticResource HorizontalSliderThumbHoverBackground}"/>
                                <Setter Property="Stroke" TargetName="OuterBorder" Value="{StaticResource HorizontalSliderThumbHoverBorder}"/>
                            </Trigger>
                            <Trigger Property="IsDragging" Value="true">
                                <Setter Property="Fill" TargetName="Background" Value="{StaticResource HorizontalSliderThumbPressedBackground}"/>
                                <Setter Property="Stroke" TargetName="OuterBorder" Value="{StaticResource HorizontalSliderThumbPressedBorder}"/>
                            </Trigger>
                            <Trigger Property="IsEnabled" Value="false">
                                <Setter Property="Fill" TargetName="Background" Value="#FFF4F4F4"/>
                                <Setter Property="Stroke" TargetName="InnerBorder" Value="{x:Null}"/>
                                <Setter Property="Data" TargetName="OuterBorder" Value="{StaticResource SliderThumbDisabledGeometry}"/>
                                <Setter Property="Stroke" TargetName="OuterBorder" Value="#FFAEB1AF"/>
                            </Trigger>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
        <LinearGradientBrush x:Key="VerticalSliderThumbHoverBackground" EndPoint="1,0" StartPoint="0,0">
            <GradientStop Color="white" Offset="0"/>
            <GradientStop Color="#B8E2F9" Offset="0.5"/>
            <GradientStop Color="#B0DFF8" Offset="1"/>
        </LinearGradientBrush>
        <LinearGradientBrush x:Key="VerticalSliderThumbPressedBackground" EndPoint="1,0" StartPoint="0,0">
            <GradientStop Color="#B8E4FA" Offset="0.25"/>
            <GradientStop Color="#5EB4E3" Offset="0.5"/>
            <GradientStop Color="#4C8BB4" Offset="1"/>
        </LinearGradientBrush>
        <LinearGradientBrush x:Key="VerticalSliderThumbNormalBackground" EndPoint="1,0" StartPoint="0,0">
            <GradientStop Color="White" Offset="0"/>
            <GradientStop Color="#F0EFEF" Offset="0.4"/>
            <GradientStop Color="#D6D5D5" Offset=".8"/>
        </LinearGradientBrush>
        <Style x:Key="VerticalSliderLeftThumbStyle" TargetType="{x:Type Thumb}">
            <Setter Property="Focusable" Value="false"/>
            <Setter Property="OverridesDefaultStyle" Value="true"/>
            <Setter Property="Height" Value="10"/>
            <Setter Property="Width" Value="18"/>
            <Setter Property="Foreground" Value="Gray"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type Thumb}">
                        <Canvas SnapsToDevicePixels="true">
                            <Canvas.RenderTransform>
                                <TransformGroup>
                                    <TransformGroup.Children>
                                        <TransformCollection>
                                            <RotateTransform Angle="90"/>
                                            <TranslateTransform X="9" Y="5"/>
                                        </TransformCollection>
                                    </TransformGroup.Children>
                                </TransformGroup>
                            </Canvas.RenderTransform>
                            <Path x:Name="Background" Data="{StaticResource SliderPointedThumbOuterBorderGeometry}" Fill="{StaticResource VerticalSliderThumbNormalBackground}"/>
                            <Path x:Name="InnerBorder" Data="{StaticResource SliderPointedThumbMiddleBorderGeometry}" Stroke="White" StrokeThickness="1"/>
                            <Path x:Name="OuterBorder" Data="{StaticResource SliderPointedThumbOuterBorderGeometry}" Stroke="#FF929292" StrokeThickness="1"/>
                        </Canvas>
                        <ControlTemplate.Triggers>
                            <Trigger Property="IsMouseOver" Value="true">
                                <Setter Property="Fill" TargetName="Background" Value="{StaticResource VerticalSliderThumbHoverBackground}"/>
                                <Setter Property="Stroke" TargetName="OuterBorder" Value="{StaticResource HorizontalSliderThumbHoverBorder}"/>
                            </Trigger>
                            <Trigger Property="Foreground" Value="Blue">
                                <Setter Property="Fill" TargetName="Background" Value="{StaticResource VerticalSliderThumbHoverBackground}"/>
                                <Setter Property="Stroke" TargetName="OuterBorder" Value="{StaticResource HorizontalSliderThumbHoverBorder}"/>
                            </Trigger>
                            <Trigger Property="IsDragging" Value="true">
                                <Setter Property="Fill" TargetName="Background" Value="{StaticResource VerticalSliderThumbPressedBackground}"/>
                                <Setter Property="Stroke" TargetName="OuterBorder" Value="{StaticResource HorizontalSliderThumbPressedBorder}"/>
                            </Trigger>
                            <Trigger Property="IsEnabled" Value="false">
                                <Setter Property="Fill" TargetName="Background" Value="#FFF4F4F4"/>
                                <Setter Property="Stroke" TargetName="InnerBorder" Value="{x:Null}"/>
                                <Setter Property="Data" TargetName="OuterBorder" Value="{StaticResource SliderPointedThumbDisabledGeometry}"/>
                                <Setter Property="Stroke" TargetName="OuterBorder" Value="#FFAEB1AF"/>
                            </Trigger>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
        <LinearGradientBrush x:Key="VerticalSliderThumbHoverBackgroundInverted" EndPoint="0,0" StartPoint="1,0">
            <GradientStop Color="white" Offset="0"/>
            <GradientStop Color="#B8E2F9" Offset="0.5"/>
            <GradientStop Color="#B0DFF8" Offset="1"/>
        </LinearGradientBrush>
        <LinearGradientBrush x:Key="VerticalSliderThumbPressedBackgroundInverted" EndPoint="0,0" StartPoint="1,0">
            <GradientStop Color="#B8E4FA" Offset="0.25"/>
            <GradientStop Color="#5EB4E3" Offset="0.5"/>
            <GradientStop Color="#4C8BB4" Offset="1"/>
        </LinearGradientBrush>
        <LinearGradientBrush x:Key="VerticalSliderThumbNormalBackgroundInverted" EndPoint="0,0" StartPoint="1,0">
            <GradientStop Color="White" Offset="0"/>
            <GradientStop Color="#F0EFEF" Offset="0.4"/>
            <GradientStop Color="#D6D5D5" Offset=".8"/>
        </LinearGradientBrush>
        <Style x:Key="VerticalSliderRightThumbStyle" TargetType="{x:Type Thumb}">
            <Setter Property="Focusable" Value="false"/>
            <Setter Property="OverridesDefaultStyle" Value="true"/>
            <Setter Property="Height" Value="10"/>
            <Setter Property="Width" Value="18"/>
            <Setter Property="Foreground" Value="Gray"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type Thumb}">
                        <Canvas SnapsToDevicePixels="true">
                            <Canvas.RenderTransform>
                                <TransformGroup>
                                    <TransformGroup.Children>
                                        <TransformCollection>
                                            <RotateTransform Angle="-90"/>
                                            <TranslateTransform X="9" Y="5"/>
                                        </TransformCollection>
                                    </TransformGroup.Children>
                                </TransformGroup>
                            </Canvas.RenderTransform>
                            <Path x:Name="Background" Data="{StaticResource SliderPointedThumbOuterBorderGeometry}" Fill="{StaticResource VerticalSliderThumbNormalBackgroundInverted}"/>
                            <Path x:Name="InnerBorder" Data="{StaticResource SliderPointedThumbMiddleBorderGeometry}" Stroke="White" StrokeThickness="1"/>
                            <Path x:Name="OuterBorder" Data="{StaticResource SliderPointedThumbOuterBorderGeometry}" Stroke="#FF929292" StrokeThickness="1"/>
                        </Canvas>
                        <ControlTemplate.Triggers>
                            <Trigger Property="IsMouseOver" Value="true">
                                <Setter Property="Fill" TargetName="Background" Value="{StaticResource VerticalSliderThumbHoverBackgroundInverted}"/>
                                <Setter Property="Stroke" TargetName="OuterBorder" Value="{StaticResource HorizontalSliderThumbHoverBorder}"/>
                            </Trigger>
                            <Trigger Property="Foreground" Value="Blue">
                                <Setter Property="Fill" TargetName="Background" Value="{StaticResource VerticalSliderThumbHoverBackgroundInverted}"/>
                                <Setter Property="Stroke" TargetName="OuterBorder" Value="{StaticResource HorizontalSliderThumbHoverBorder}"/>
                            </Trigger>
                            <Trigger Property="IsDragging" Value="true">
                                <Setter Property="Fill" TargetName="Background" Value="{StaticResource VerticalSliderThumbPressedBackgroundInverted}"/>
                                <Setter Property="Stroke" TargetName="OuterBorder" Value="{StaticResource HorizontalSliderThumbPressedBorder}"/>
                            </Trigger>
                            <Trigger Property="IsEnabled" Value="false">
                                <Setter Property="Fill" TargetName="Background" Value="#FFF4F4F4"/>
                                <Setter Property="Stroke" TargetName="InnerBorder" Value="{x:Null}"/>
                                <Setter Property="Data" TargetName="OuterBorder" Value="{StaticResource SliderPointedThumbDisabledGeometry}"/>
                                <Setter Property="Stroke" TargetName="OuterBorder" Value="#FFAEB1AF"/>
                            </Trigger>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
        <LinearGradientBrush x:Key="VerticalSliderTrackNormalBorder" EndPoint="1,0" StartPoint="0,0">
            <GradientStop Color="#FFAEB1AF" Offset="0.1"/>
            <GradientStop Color="White" Offset=".9"/>
        </LinearGradientBrush>
        <Style x:Key="VerticalSliderThumbStyle" TargetType="{x:Type Thumb}">
            <Setter Property="Focusable" Value="false"/>
            <Setter Property="OverridesDefaultStyle" Value="true"/>
            <Setter Property="Height" Value="11"/>
            <Setter Property="Width" Value="22"/>
            <Setter Property="Foreground" Value="Gray"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type Thumb}">
                        <Canvas SnapsToDevicePixels="true">
                            <Canvas.RenderTransform>
                                <TransformGroup>
                                    <TransformGroup.Children>
                                        <TransformCollection>
                                            <RotateTransform Angle="90"/>
                                            <TranslateTransform X="11" Y="5.5"/>
                                        </TransformCollection>
                                    </TransformGroup.Children>
                                </TransformGroup>
                            </Canvas.RenderTransform>
                            <Path x:Name="Background" Data="{StaticResource SliderThumbOuterBorderGeometry}" Fill="{StaticResource VerticalSliderThumbNormalBackground}"/>
                            <Path x:Name="InnerBorder" Data="{StaticResource SliderThumbMiddleBorderGeometry}" Stroke="White" StrokeThickness="1"/>
                            <Path x:Name="OuterBorder" Data="{StaticResource SliderThumbOuterBorderGeometry}" Stroke="#FF929292" StrokeThickness="1"/>
                        </Canvas>
                        <ControlTemplate.Triggers>
                            <Trigger Property="IsMouseOver" Value="true">
                                <Setter Property="Fill" TargetName="Background" Value="{StaticResource VerticalSliderThumbHoverBackground}"/>
                                <Setter Property="Stroke" TargetName="OuterBorder" Value="{StaticResource HorizontalSliderThumbHoverBorder}"/>
                            </Trigger>
                            <Trigger Property="Foreground" Value="Blue">
                                <Setter Property="Fill" TargetName="Background" Value="{StaticResource VerticalSliderThumbHoverBackground}"/>
                                <Setter Property="Stroke" TargetName="OuterBorder" Value="{StaticResource HorizontalSliderThumbHoverBorder}"/>
                            </Trigger>
                            <Trigger Property="IsDragging" Value="true">
                                <Setter Property="Fill" TargetName="Background" Value="{StaticResource VerticalSliderThumbPressedBackground}"/>
                                <Setter Property="Stroke" TargetName="OuterBorder" Value="{StaticResource HorizontalSliderThumbPressedBorder}"/>
                            </Trigger>
                            <Trigger Property="IsEnabled" Value="false">
                                <Setter Property="Fill" TargetName="Background" Value="#FFF4F4F4"/>
                                <Setter Property="Stroke" TargetName="InnerBorder" Value="{x:Null}"/>
                                <Setter Property="Data" TargetName="OuterBorder" Value="{StaticResource SliderThumbDisabledGeometry}"/>
                                <Setter Property="Stroke" TargetName="OuterBorder" Value="#FFAEB1AF"/>
                            </Trigger>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
        <Style x:Key="SliderStyle1" TargetType="{x:Type Slider}">
            <Setter Property="Stylus.IsPressAndHoldEnabled" Value="false"/>
            <Setter Property="Background" Value="Transparent"/>
            <Setter Property="Foreground" Value="#FFC4C4C4"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type Slider}">
                        <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" SnapsToDevicePixels="true">
                            <Grid>
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="Auto"/>
                                    <RowDefinition Height="Auto" MinHeight="{TemplateBinding MinHeight}"/>
                                    <RowDefinition Height="Auto"/>
                                </Grid.RowDefinitions>
                                <TickBar x:Name="TopTick" Fill="{TemplateBinding Foreground}" Height="4" Placement="Top" Grid.Row="0" Visibility="Collapsed"/>
                                <TickBar x:Name="BottomTick" Fill="{TemplateBinding Foreground}" Height="4" Placement="Bottom" Grid.Row="2" Visibility="Collapsed"/>
                                <Border x:Name="TrackBackground" BorderBrush="{StaticResource HorizontalSliderTrackNormalBorder}" BorderThickness="1" Background="{StaticResource HorizontalSliderTrackNormalBackground}" CornerRadius="1" Height="4.0" Margin="5,0" Grid.Row="1" VerticalAlignment="center">
                                    <Canvas Margin="-6,-1">
                                        <Rectangle x:Name="PART_SelectionRange" Fill="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}" Height="4.0" Stroke="{DynamicResource {x:Static SystemColors.ControlDarkDarkBrushKey}}" StrokeThickness="1.0" Visibility="Hidden"/>
                                    </Canvas>
                                </Border>
                                <Track x:Name="PART_Track" Grid.Row="1">
                                    <Track.DecreaseRepeatButton>
                                        <RepeatButton Command="{x:Static Slider.DecreaseLarge}" Style="{StaticResource SliderRepeatButtonStyle}"/>
                                    </Track.DecreaseRepeatButton>
                                    <Track.IncreaseRepeatButton>
                                        <RepeatButton Command="{x:Static Slider.IncreaseLarge}" Style="{StaticResource SliderRepeatButtonStyle}"/>
                                    </Track.IncreaseRepeatButton>
                                    <Track.Thumb>
                                        <Thumb x:Name="Thumb" Style="{StaticResource HorizontalSliderThumbStyle}"/>
                                    </Track.Thumb>
                                </Track>
                            </Grid>
                        </Border>
                        <ControlTemplate.Triggers>
                            <Trigger Property="TickPlacement" Value="TopLeft">
                                <Setter Property="Visibility" TargetName="TopTick" Value="Visible"/>
                                <Setter Property="Style" TargetName="Thumb" Value="{StaticResource HorizontalSliderUpThumbStyle}"/>
                                <Setter Property="Margin" TargetName="TrackBackground" Value="5,2,5,0"/>
                            </Trigger>
                            <Trigger Property="TickPlacement" Value="BottomRight">
                                <Setter Property="Visibility" TargetName="BottomTick" Value="Visible"/>
                                <Setter Property="Style" TargetName="Thumb" Value="{StaticResource HorizontalSliderDownThumbStyle}"/>
                                <Setter Property="Margin" TargetName="TrackBackground" Value="5,0,5,2"/>
                            </Trigger>
                            <Trigger Property="TickPlacement" Value="Both">
                                <Setter Property="Visibility" TargetName="TopTick" Value="Visible"/>
                                <Setter Property="Visibility" TargetName="BottomTick" Value="Visible"/>
                            </Trigger>
                            <Trigger Property="IsSelectionRangeEnabled" Value="true">
                                <Setter Property="Visibility" TargetName="PART_SelectionRange" Value="Visible"/>
                            </Trigger>
                            <Trigger Property="IsKeyboardFocused" Value="true">
                                <Setter Property="Foreground" TargetName="Thumb" Value="Blue"/>
                            </Trigger>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
            <Style.Triggers>
                <Trigger Property="Orientation" Value="Vertical">
                    <Setter Property="Template">
                        <Setter.Value>
                            <ControlTemplate TargetType="{x:Type Slider}">
                                <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" SnapsToDevicePixels="true">
                                    <Grid>
                                        <Grid.ColumnDefinitions>
                                            <ColumnDefinition Width="Auto"/>
                                            <ColumnDefinition MinWidth="30" Width="Auto"/>
                                            <ColumnDefinition Width="Auto"/>
                                        </Grid.ColumnDefinitions>
                                        <TickBar x:Name="TopTick" Grid.Column="0" Fill="{TemplateBinding Foreground}" Placement="Left" Visibility="Collapsed" Width="4"/>
                                        <TickBar x:Name="BottomTick" Grid.Column="2" Fill="{TemplateBinding Foreground}" Placement="Right" Visibility="Collapsed" Width="4"/>
                                        <Border x:Name="TrackBackground" BorderBrush="{StaticResource VerticalSliderTrackNormalBorder}" BorderThickness="1" Background="{StaticResource HorizontalSliderTrackNormalBackground}" Grid.Column="1" CornerRadius="1" HorizontalAlignment="center" Margin="0,5" Width="4.0">
                                            <Canvas Margin="-1,-6">




                                                <Rectangle x:Name="PART_SelectionRange" Fill="Gray" Stroke="Gray" StrokeThickness="1.0" Visibility="Hidden" Width="4.0" RadiusX="10" RadiusY="10"/>
                                                <Border>
                                                    <Path Stroke="DimGray" StrokeThickness="2" Fill="DimGray">
                                                        <Path.Data>
                                                            <RectangleGeometry Rect="-5,0,13,475" RadiusX="10" RadiusY="10"/>
                                                        </Path.Data>
                                                    </Path>
                                                </Border>
                                            </Canvas>
                                        </Border>
                                        <Track x:Name="PART_Track" Grid.Column="1">
                                            <Track.DecreaseRepeatButton>
                                                <RepeatButton Command="{x:Static Slider.DecreaseLarge}" Width="13" Margin="23.5,0" Background="{x:Null}" BorderBrush="{x:Null}" />
                                            </Track.DecreaseRepeatButton>
                                            <Track.IncreaseRepeatButton>
                                                <RepeatButton Command="{x:Static Slider.IncreaseLarge}" Width="13" Margin="23.5,0,23.5,-26.333" Background="{x:Null}" BorderBrush="{x:Null}" />
                                            </Track.IncreaseRepeatButton>
                                            <Track.Thumb>
                                                <Thumb x:Name="Thumb" Margin="0,0.5,0,-0.5" Width="60" Height="60" Foreground="White">
                                                    <Thumb.Style>
                                                        <Style TargetType="{x:Type Thumb}">
                                                            <Setter Property="Template">
                                                                <Setter.Value>
                                                                    <ControlTemplate TargetType="{x:Type Thumb}">
                                                                        <Ellipse Width="60" Height="60" Stroke="white" Fill="White" StrokeThickness="2"/>
                                                                    </ControlTemplate>
                                                                </Setter.Value>
                                                            </Setter>
                                                        </Style>
                                                    </Thumb.Style>

                                                </Thumb>
                                            </Track.Thumb>
                                        </Track>
                                    </Grid>
                                </Border>
                                <ControlTemplate.Triggers>
                                    <Trigger Property="TickPlacement" Value="TopLeft">
                                        <Setter Property="Visibility" TargetName="TopTick" Value="Visible"/>
                                        <Setter Property="Style" TargetName="Thumb" Value="{StaticResource VerticalSliderLeftThumbStyle}"/>
                                        <Setter Property="Margin" TargetName="TrackBackground" Value="2,5,0,5"/>
                                    </Trigger>
                                    <Trigger Property="TickPlacement" Value="BottomRight">
                                        <Setter Property="Visibility" TargetName="BottomTick" Value="Visible"/>
                                        <Setter Property="Style" TargetName="Thumb" Value="{StaticResource VerticalSliderRightThumbStyle}"/>
                                        <Setter Property="Margin" TargetName="TrackBackground" Value="0,5,2,5"/>
                                    </Trigger>
                                    <Trigger Property="TickPlacement" Value="Both">
                                        <Setter Property="Visibility" TargetName="TopTick" Value="Visible"/>
                                        <Setter Property="Visibility" TargetName="BottomTick" Value="Visible"/>
                                    </Trigger>
                                    <Trigger Property="IsSelectionRangeEnabled" Value="true">
                                        <Setter Property="Visibility" TargetName="PART_SelectionRange" Value="Visible"/>
                                    </Trigger>
                                    <Trigger Property="IsKeyboardFocused" Value="true">
                                        <Setter Property="Foreground" TargetName="Thumb" Value="Blue"/>
                                    </Trigger>
                                </ControlTemplate.Triggers>
                            </ControlTemplate>
                        </Setter.Value>
                    </Setter>
                </Trigger>
            </Style.Triggers>
        </Style>
        <Style x:Key="roundSlider" TargetType="{x:Type Button}">
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type Button}">
                        <Grid>
                            <Slider Maximum="100" Minimum="-100" Orientation="Vertical" Style="{DynamicResource SliderStyle1}" Background="#005E5959"/>
                            <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
                        </Grid>
                        <ControlTemplate.Triggers>
                            <Trigger Property="IsFocused" Value="True"/>
                            <Trigger Property="IsDefaulted" Value="True"/>
                            <Trigger Property="IsMouseOver" Value="True"/>
                            <Trigger Property="IsPressed" Value="True"/>
                            <Trigger Property="IsEnabled" Value="False"/>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
    </Window.Resources>



    <Grid Background="Black">
        <WebBrowser x:Name="IPCam" Source="http://192.168.2.250:8080/jsfs.html" Height="480" Width="728 " Margin="300,77,300,77" Opacity="0.5" Grid.RowSpan="2" Grid.Row="1" Navigated="IPCam_Navigated"  />
        <Grid HorizontalAlignment="Left" Height="94" VerticalAlignment="Top" Width="1358" Background="#FF535353">
            <Border BorderBrush="Black" BorderThickness="1,0,1,0" HorizontalAlignment="Left" Height="100" Margin="680,0,0,-6" VerticalAlignment="Top" Width="360">
                <TextBlock x:Name="alert" HorizontalAlignment="Right" Height="100" Margin="-1,0" TextWrapping="Wrap" VerticalAlignment="Center" TextAlignment="Center" Width="360" Padding="0,40,0,0" FontSize="30" FontFamily="Segoe WP" Foreground="White" TextDecorations="{x:Null}"><Run Text="RESPONSE TEXT"/></TextBlock>
            </Border>
            <Border BorderBrush="Black" BorderThickness="1,0,0,0" HorizontalAlignment="Left" Height="94" Margin="543,0,0,0" VerticalAlignment="Top" Width="137">
                <Image x:Name="car" HorizontalAlignment="Left" Height="68" VerticalAlignment="Top" Width="72" Source="Images/car.png" Margin="6,16,0,0"/>
            </Border>
            <Border BorderBrush="Black" BorderThickness="0" HorizontalAlignment="Left" Height="94" Margin="384,0,0,0" VerticalAlignment="Top" Width="159">
                <Image Name="cameraLens" HorizontalAlignment="Left" Height="68" Margin="22,12,0,0" VerticalAlignment="Top" Width="66"  Stretch="Fill" Source="Images/camera-lens.png"  />

            </Border>
            <Border BorderBrush="Black" BorderThickness="1,0,1,0" HorizontalAlignment="Left" Height="94" Margin="317,0,0,0" VerticalAlignment="Top" Width="67"/>
            <Image Name="logo" HorizontalAlignment="Left" Height="94" VerticalAlignment="Top" Width="228" Source="Images/kin_logo.png"/>
            <Image Name="power" HorizontalAlignment="Left" Height="68" Margin="240,12,0,0" VerticalAlignment="Top" Width="72" Source="Images/power.png"/>
            <Image Name="mic" HorizontalAlignment="Left" Height="68" Margin="312,12,0,0" VerticalAlignment="Top" Width="75" Source="Images/microphone.png" Stretch="Fill"/>
            <Image Name="cameraUp" HorizontalAlignment="Left" Height="49" Margin="485,0,0,0" VerticalAlignment="Top" Width="58" Source="Images/upArrow.png" Stretch="Fill" />
            <Image Name="cameraDown" HorizontalAlignment="Left" Height="49" Margin="486,45,0,0" VerticalAlignment="Top" Width="58" Source="Images/downArrow.png" Stretch="Fill"/>
            <Image Name="carForward"  HorizontalAlignment="Left" Height="49" Margin="616,0,0,0" VerticalAlignment="Top" Width="58" Source="Images/upArrow.png" Stretch="Fill" />
            <Image Name="carBackward" HorizontalAlignment="Left" Height="49" Margin="617,45,0,0" VerticalAlignment="Top" Width="58" Source="Images/downArrow.png" Stretch="Fill"/>
            



        </Grid>

       
        <Slider x:Name="leftSlider" HorizontalAlignment="Left" Margin="188,129,0,125"   Style="{DynamicResource SliderStyle1}" Width="82" Orientation="Vertical"  Maximum="100" Minimum="-100"/>
        <Slider x:Name="rtSlider" HorizontalAlignment="Left" Margin="1090,129,0,125"   Style="{DynamicResource SliderStyle1}" Width="82" Orientation="Vertical" Maximum="100" Minimum="-100"/>
        <Toolkit:KinectSensorChooserUI x:Name="kinectChooserUI" IsListening="True" HorizontalAlignment="Left" Margin="553,327,0,0" VerticalAlignment="Top" Height="158" Width="249"/>
       
        <TextBlock HorizontalAlignment="Left" Height="24" Margin="0,694,0,0" TextWrapping="Wrap" Text="UI Design: Joe Fitzsimmons" VerticalAlignment="Top" Width="148" Foreground="White"/>
        <TextBlock HorizontalAlignment="Left" Height="24" Margin="0,718,0,-5" TextWrapping="Wrap" Text="Programming: Zachary Pentland" VerticalAlignment="Top" Width="179" Foreground="White"/>
    </Grid>
</Window>
